﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GeneticAlgorithm
{
    public interface IGenericSimulator
    {
        /// <summary>
        /// The input configuration
        /// </summary>
        List<Configuration> Input { get; set; }

        /// <summary>
        /// The output object, implemented by each simulator interface
        /// </summary>
        List<SimulatedConfiguration> Output { get; }

        /// <summary>
        /// Returns a list of strings in which each string is and parameter name that has an
        /// variable value (more than one)
        /// </summary>
        List<string> ChangebleParameters { get; }

        /// <summary>
        /// Returns a list of strings in which each string is and parameter name that has an
        /// static value
        /// </summary>
        List<string> UnchangebleParameters { get; }

        /// <summary>
        /// The number of traces that the simulator uses
        /// </summary>
        int TracesCount { get; }

        /// <summary>
        /// Starts the simulation  with default parameters
        /// </summary>
        void Run();

        /// <summary>
        /// Returns a list with random parameters that can be used by the simulator
        /// </summary>
        /// <returns>The parameter list</returns>
        List<Configuration> GetInitialConfigurations(int count);

        /// <summary>
        /// Randomize an certain number of parameters given
        /// </summary>
        /// <param name="configuration">the configuration to be randomized</param>
        /// <param name="count">the number of parameters to be randomized</param>
        void RandomizeConfiguration(Configuration configuration, int count);

        /// <summary>
        /// Gets an instance of an configuration with unique name and no parameters added
        /// </summary>
        /// <returns>empty configuration instance</returns>
        Configuration ConfigurationFactory();

        /// <summary>
        /// Gets an instance of an configuration with no parameters added
        /// </summary>
        /// <param name="name">The identifier of the configuration</param>
        /// <returns>empty configuration</returns>
        Configuration ConfigurationFactory(string name);
    }
}
